package windbell.domain.risk.impl;

import edu.fudan.mylang.pf.BaseDAOService;
import org.eclipse.xtext.xbase.lib.ObjectExtensions;
import org.eclipse.xtext.xbase.lib.Procedures.Procedure1;
import org.springframework.stereotype.Service;
import windbell.domain.risk.RiskCategory;
import windbell.domain.risk.RiskCategoryDAO;
import windbell.domain.risk.impl.RiskCategoryImpl;

@Service("windbell.domain.risk.RiskCategoryDAO")
public class RiskCategoryDAOImpl extends BaseDAOService<RiskCategory> implements RiskCategoryDAO {
  public RiskCategory create(final String code, final Procedure1<? super RiskCategory> init) {
    RiskCategory riskCategory=RiskCategoryImpl.create(code,getObjectFactory());
    
    final Procedure1<RiskCategory> _function = new Procedure1<RiskCategory>() {
        public void apply(final RiskCategory it) {
          init.apply(it);
        }
      };
    RiskCategory _doubleArrow = ObjectExtensions.<RiskCategory>operator_doubleArrow(riskCategory, _function);
    return _doubleArrow;
  }
}
